package com.yuanfeng.userms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.userms.dto.ManageImageNameUpdateParamDTO;
import com.yuanfeng.userms.dto.ManageImageSpaceQueryDTO;
import com.yuanfeng.userms.dto.ManageImageUploadParamDTO;
import com.yuanfeng.userms.entity.UserUploadBaseEntity;
import com.yuanfeng.userms.vo.ManageUploadBaseQueryResultVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName UserUploadBaseMapper
 * @Description 用户附件表-图片、视频
 * @Author cf
 * @Date 2023/6/29 9:14
 * @Version 1.0
 */
@Mapper
public interface UserUploadBaseMapper extends BaseMapper<UserUploadBaseEntity> {


    /**
     * 图片空间查询
     * @param param
     * @return
     */
    IPage<ManageUploadBaseQueryResultVO> selectByAlbumId(IPage<ManageUploadBaseQueryResultVO> page , @Param("param") ManageImageSpaceQueryDTO param);

    /**
     * 查询条数
     * @param param
     * @return
     */
    Integer selectByAlbumIdCount2(@Param("param") ManageImageSpaceQueryDTO param);

    /**
     * 删除图片
     * @param uploadIds
     */
    void deleteImageBatch(@Param("uploadIds")List<Integer> uploadIds);

    /**
     * 更改图片名称
     * @param param
     * @return
     */
    void updateImageName(@Param("param") ManageImageNameUpdateParamDTO param);


    /**
     * 上传
     * @param param
     */
    void insertImage(@Param("param") ManageImageUploadParamDTO param);

    /**
     * 修改
     * @param param
     */
    void uploadImage(@Param("param")ManageImageUploadParamDTO param);
}
